import axios from '@/axios/axios'

/**
 * 获取商品分类列表
 * @returns 
 */
export const get_categories=(obj)=>axios.get('categories',{params:obj})


/**
 * 
 * @param {*} obj 
 * @returns 
 */
export const post_categories=(obj)=>axios.post('categories',obj)


/**
 * 查询
 * @param {*} id 
 * @returns 
 */
export const getS_categories=(id)=>axios.get(`categories/${id}`)
/**
 * 删除
 * @param {*} id 
 * @returns 
 */
export const delete_categories=(id)=>axios.delete(`categories/${id}`)

/**
 * 编辑
 * @param {*} id 
 * @returns 
 */
export const put_categories=(id,cat_name)=>axios.put(`categories/${id}`,cat_name)